﻿using Common.Data.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataCenter.Configuration;
using DataCenter.Model.Model;

namespace DataCenter.Data.DBConfig
{
    public class MessageHistoryConfiguration : DBConfig<MessageHistory>
    {
        public MessageHistoryConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.Moseq, k.Shortcode, k.CellNo, k.Msgtype, k.Cmdcode });
            Property(c => c.Shortcode).IsRequired();
            Property(c => c.CellNo).IsRequired();
            Property(c => c.Msgtype).IsRequired();
            Property(c => c.Cmdcode).IsRequired();
        }
    }
}
